
/*
 * Create by wangy
 * Date:2010-09-17
 */

function trim(str){
    return str.replace(/(^\s*)|(\s*$)/g,'');//去掉空格
  }

function submitValues(){



	var item = $(":radio:checked");
	var len = item.length;
	if(len==0){
		alert("请选择处理方式！");
		return false;
	}
	
	var pub_state = $("input[name='pub_state']:radio:checked").val()
	
	if(pub_state == "2" || pub_state == "3"){
		$("#order_state").val("4")
	}
	/**
	var other_state = $("#other_state").attr("value");
	if( other_state.indexOf("0") > -1 || other_state.indexOf("1") > -1 ){
		$("#state_group").attr("value",'1');
	}else if( other_state.indexOf("2") > -1 || other_state.indexOf("3") > -1 ){
		$("#state_group").attr("value",'2');
	}
	**/

	var str = CKEDITOR.instances.deal_reason.getData();
	str = str.replace('<br />','');
 	str = str.replace('<br>','');
 	str = trim(str);
	if(str == ''){
  	alert('请填写处理原因!');
  		CKEDITOR.instances.deal_reason.focus();
		return false;
	}



}